#include <iostream>
using namespace std;

void swap1(int x, int y)
{
  int z = x;
  x = y;
  y = z;
}

void swap2(int &x, int &y)
{
  int z = x;
  x = y;
  y = z;
}

int main()
{
  int firstNum = 10;
  int secondNum = 20;

  cout << "Before swap: "
       << "\n";
  cout << firstNum << secondNum << "\n";

  // Call the function, which will change the values of firstNum and secondNum
  cout << "After swap: "
       << "\n";
  
  swap1(firstNum, secondNum);
  cout << firstNum << " " << secondNum << "\n";

  swap2(firstNum, secondNum);
  cout << firstNum << " " << secondNum << "\n";

  return 0;
}